<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <title>HiMall</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" th:href="@{/static/favicon.ico}">

    <link th:href="@{/static/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
    <script th:src="@{/static/bootstrap/js/bootstrap.min.js}"></script>

    <link th:href="@{/static/css/index.css}" rel="stylesheet">
</head>
<body>


<div class="container">
    <div class="header clearfix">
        <nav>
            <ul class="nav nav-pills pull-right">
                <li role="presentation"><a th:href="@{/}">Home</a></li>
                <li role="presentation" th:if="${session.isAuth!=null ? session.isAuth : false}" class="active"><a th:href="@{/profile}">Profile</a></li>
                <li role="presentation" th:if="${session.isAuth!=null ? !session.isAuth : true}"><a th:href="@{/signin}">Login</a></li>
                <li role="presentation" th:if="${session.isAuth!=null ? session.isAuth : false}"><a th:href="@{/logout}">Logout</a></li>
            </ul>
        </nav>
        <h3 class="text-muted">HIMALL</h3>
    </div>

    <div style="margin-top: 30px;"><span class="glyphicon glyphicon-user" aria-hidden="true"></span> 用户信息</div>
    <div class="row">
        <div class="col-md-2 title">用户姓名：</div><div class="col-md-4 text" th:text="${name}"></div>
        <div class="col-md-2 title">用户账号：</div><div class="col-md-4 text" th:text="${username}"></div>
        <div class="col-md-2 title">手机号码：</div><div class="col-md-4 text" th:text="${tel}"></div>
        <div class="col-md-2 title">最近登录：</div><div class="col-md-4 text" th:text="${#dates.format(lastLoginTime, 'yyyy-MM-dd hh:mm:ss')}"></div>
    </div>

    <div style="margin-top: 30px;"><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> 我的订单</div>
    <div class="row">
        <div class="col-md-2 title">订单编号：</div><div class="col-md-4 text" th:text="${orderNo}"></div>
        <div class="col-md-2 title">订单标题：</div><div class="col-md-4 text" th:text="${orderTitle}"></div>
        <div class="col-md-2 title">创建时间：</div><div class="col-md-4 text" th:text="${#dates.format(orderCreateTime, 'yyyy-MM-dd hh:mm')}"></div>
        <div class="col-md-2 title">订单总额：</div><div class="col-md-4 text" th:text="${orderTotalAmount}"></div>
    </div>

    <div class="row" style="margin-top: 30px; padding: 0px 15px;">
        <div class="panel panel-default">
            <div class="panel-heading">商品列表</div>
            <table class="table">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>商品名称</th>
                        <th>单价（元）</th>
                        <th>库存（个）</th>
                        <th>上架时间</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="goods,stat : ${goodsList}">
                        <th scope="row" th:text="${stat.index + 1}"></th>
                        <td th:text="${goods.title}"></td>
                        <td th:text="${goods.price}"></td>
                        <td th:text="${goods.amount}"></td>
                        <td th:text="${#dates.format(goods.createTime, 'yyyy-MM-dd hh:mm')}"></td>
                    </tr>
                </tbody>
            </table>

        </div>
    </div>

    <footer class="footer">
        <p>&copy; HiMall system for hiauth.com, by @earven.</p>
    </footer>

</div>

</body>
</html>
